<template>
  <div class="container">
    <el-radio v-model="radio" label="1">通过</el-radio>
    <el-radio v-model="radio" label="2">拒绝</el-radio>
    <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="textarea"></el-input>
  </div>
</template>

<script>
import instance from '@/utils/request'
export default {
  data() {
    return {
      radio: '1',
      textarea: ''
    }
  },
  methods: {
    async changeState(id) {
      // console.log(id)
      try {
        const { data: res } = await instance({
          method: 'POST',
          url: `/questions/check/${id}`,
          data: {
            id: id,
            chkState: parseInt(this.radio),
            chkRemarks: this.textarea
          }
        })
        console.log(res)
      } catch (err) {
        console.log(err)
        this.$message.error('审核失败')
      }
    }
  }
}
</script>

<style scoped lang='less'>
/deep/.el-textarea__inner {
  margin-top: 20px;
  width: 50% !important;
}
</style>
